window.onload=function(){
	var app = new Vue({
		el:'#app',
		data:{
			biaoti:"确认订单",
			text1:"巧罗进口料手工黑松露巧克力礼盒8口味400g零食包邮",
			text2:"德芙巧克力喜糖批发散装4.5g小粒装结婚丝滑牛奶黑婚礼糖果旗舰店,德芙巧克力喜糖批发散装4.5g小粒装结婚丝滑牛奶黑婚礼糖果旗舰店",  				
			str:".....",
			nub1:10,
			nub2:60,
			str2:".....",
			isShow:true,
			xiang:"更多详情",
			shuliang:1,
			jiage:1200,
			shsj1:'工作日、双休日与节假日均可送货',
			shsj2:'只有双休日、节假日送货（工作日不用送货）',
			shsj3:'只有工作日送货（双休日、节假日不用送货）写字楼/商用地址客户选择',
			zj:1,
			yfzj:1,
			// _this:this,
			
		},
		filters:{
			xx:function(aa,cont,str){
				if(aa.length>cont){
					return aa.slice(0,cont)+str;
				}else{
					return aa;
				}
			}
		},
		methods:{
			open(){
				if(this.isShow){
					this.str2=".....";
					this.nub2=60;
					this.xiang="更多详情";
					this.isShow=false;
				}else{
					this.str2='';
					this.nub2=this.text2.length;
					this.xiang="收起详情";
					this.isShow=true;
				}
			},
			jian(){
				if(this.shuliang<2){
					this.shuliang==1;
				}else{
					this.shuliang--;
					this.jiage = this.shuliang*1200;
				}
			},
			jia(){
				if(this.jiage<1200){
					this.jiage==1200;
				}else{
					this.shuliang++;
					this.jiage = this.shuliang*1200;
				}
			},
			tijiao(){
				var shr = document.getElementById('shr');
				var sjhm = document.getElementById('sjhm');
				var dqxx = document.getElementById('dqxx');
				var xxdz = document.getElementById('xxdz');
				var yzbm = document.getElementById('yzbm');
				var shr2 = document.getElementById('shr2');
				var sjhm2 = document.getElementById('sjhm2');
				var dqxx2 = document.getElementById('dqxx2');
				var yzbm2 = document.getElementById('yzbm2');
				var zzj_yemian2 = document.getElementById('zzj_yemian2');
				var fhsj2 = document.getElementById('fhsj2');
				var intpt = document.getElementsByName('sex');
				var qiaokeli = document.getElementById('qiaokeli');
				var yemian2_box3 = document.getElementById('yemian2_box3');
				var jiajian = document.getElementById('jiajian');
				shr2.innerHTML = shr.value;
				sjhm2.innerHTML = sjhm.value ;
				dqxx2.innerHTML = dqxx.value + xxdz.value;
				yzbm2.innerHTML = yzbm.value;
				zzj_yemian2.style.display='block';
				for(i=0;i<intpt.length;i++){
					if(intpt[i].checked){
						fhsj2.innerHTML = intpt[i].value;
					}
				}
				jiajian.style.display='none';
				yemian2_box3.innerHTML = qiaokeli.innerHTML;
				
			},
			yincahng(){
				var zzj_yemian2 = document.getElementById('zzj_yemian2');
				var jiajian = document.getElementById('jiajian');
				zzj_yemian2.style.display='none';
				jiajian.style.display='block';
			},
			guanbi(){
				var box = document.getElementById('zzj_fukuanchengggong');
				box.style.display='none';
			},
			dakai(){
				var box = document.getElementById('zzj_fukuanchengggong');
				box.style.display='block';
				this.zj = this.jiage;
				this.yfzj = this.jiage +10;
			},
			// tichuanzhi(){
			// 	this.jiage=localStorage.getItem("jiesuan");
			// },
				
		},
		// mounted(){
		// 	this.tichuanzhi();
		// }
	})
}